# 失败
import requests
import re
import json
headers = {"user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"}
url = 'https://haokan.baidu.com/?sfrom=baidu-top'

response = requests.get(url,headers=headers)
html = response.text
print(html)

name = re.findall(r'"top_video_list":(\[.*?])',html)
print(name)
response_json = json.loads(name[0])
print(response_json)

for item in response_json:
    print(item)

